﻿#include <windows.h>
#include "cefapp/mycefapp.h"

int APIENTRY wWinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPWSTR lpCmdLine,
    int nCmdShow)
{
    //CefEnableHighDPISupport();
    CefMainArgs main_args(hInstance);
    CefSettings settings;
    settings.log_severity = LOGSEVERITY_VERBOSE; // 或者 LOGSEVERITY_DEFAULT, LOGSEVERITY_INFO, 等
    CefString(&settings.log_file).FromASCII("cef_debug_log.txt"); // 设置日志文件路径
    int exit_code = CefExecuteProcess(main_args, nullptr, nullptr);
    if (exit_code >= 0) {
        return exit_code;
    }
    CefRefPtr<MyCefApp> app(new MyCefApp());
    CefInitialize(main_args, settings, app.get(), nullptr);
    CefRunMessageLoop();
    CefShutdown();
    return 0;
}
